/**
 * 功能描述 表单
 */

define(function (require, exports, module){
	var Form = require("form");
	var store =require("store");
	var activeUser = store.get("user");
	var enmu=require("enums");
	
	var instance = {
		initComponent: function (params,widget){
			var form=new Form({
				parentNode:".J-form",
				show:false,
				model:{
					id:"planItem",
					defaultButton:false,
					layout : "2_1",
					items:[{
						name:"name",
						label:"姓名",
					},{
						name:"sex",
						label:"性别",
						type: "radio",
	                    list : enmu["com.eling.elcms.basedoc.model.Sex"],
					},{
						name:"idNumber",
						label:"身份证号",
					},{
						name:"mobilePhone",
						label:"联系电话",
					},{
						name:"birthday",
						label:"生日",
						type:"date",
						mode:"YYYY-MM-DD",
					},{
						name:"age",
						label:"年龄",
						format:function(data,row){
							if(row==null||row==""){
								return 0;
							}
						}
					},{
						name:"wechat",
						label:"微信",
					},{
						name:"qq",
						label:"QQ",
					},{
						name:"electronicMail",
						label:"E-MAIL",
					},{
						name:"houseRegister",
						label:"省/市/区(县)",
					},{
						name:"zipCode",
						label:"邮编",
					},{
						name:"address",
						label:"详细地址",
					},{
						name:"dataSource",
						label:"客户类型",
					},{
						name:"product",
						label:"意向产品",
					},{
						name:"productType",
						label:"产品类型",
					},{
						name:"intention",
						label:"意向",
					},{
						name:"visitTime",
						label:"来访时间",
						type:"date",
						model:"YYYY-MM-DD"
					},{
						name:"visitWay",
						label:"访问方式",
						type:"select",
						keyField : "pkVisitWay",
						valueField : "name",
					},{
						name:"saleConsultant",
						label:"销售顾问",
					},{
						name:"contents",
						label:"沟通内容",
						type:"textarea",
						"break":true,
					},{
						name:"description",
						label:"备注",
					}]
				}
			});
			widget.set("form", form);
		}
	};
	module.exports = instance;
});